local fenxiu = fk.CreateSkill{
  name = "wk_heg__fenxiu",
}

Fk:loadTranslationTable{
  ["wk_heg__fenxiu"] = "焚绣",
  [":wk_heg__fenxiu"] = "结束阶段，若你没有明置的手牌，你可以明置所有手牌，然后对一名角色造成1点火焰伤害",
  ["#wk_heg__lilongji_prompt"] = "焚绣：你可以选择一名角色，对其造成1点火焰伤害",

}

local HG = require "packages/new_heg_diy_my/util"
local H = require "packages/ol_hegemony/util"

fenxiu:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(self) and player == target and target.phase == Player.Finish
     and not player:isKongcheng() and #HG.getShownCards(player) == 0
  end,
  on_cost = function (self, event, target, player, data)
    local room = player.room
    local to = room:askToChoosePlayers(player,{
      targets = room:getAlivePlayers(),
      min_num = 1,
      max_num = 1,
      prompt = "#wk_heg__lilongji_prompt",
      skill_name = fenxiu.name})
    if #to > 0 then
      event:setCostData(self, {to = to[1]})
      return true
    end
  end,
  on_use = function (self, event, target, player, data)
    HG.showCards(player,player:getCardIds("h"))
    if player.dead then return end
    player.room:damage{
      from = player,
      to = event:getCostData(self).to,
      damageType = fk.FireDamage,
      damage = 1,
      skillName = fenxiu.name
    }
  end
})

return fenxiu